#ifndef circlecomponent_h
#define circlecomponent_h

#include <string>
#include <iostream>
#include <cmath>
#include "juce_amalgamated.h"
#include "MouseState.h"

using std::string;
using std::cout;
using std::cerr;
using std::endl;

class MainPanel;

class CircleComponent: public Component {
private:
	int id;
	int x, y, radius;
	Image* image;
	MouseState state;
	MainPanel* parent;
	float radians; //angle for circle animation

	const static int outerBuffer = 5; //padding from sides of component
	const static int innerBuffer = 9; //padding between concentric circles

	String name;
	String filename;

	Image* icon;

	GradientBrush* greyGradient;
	GradientBrush* orangeGradient;

	void startCircleAnimation();
	void stopCircleAnimation();
	//	void timerCallback();

public:
	CircleComponent(MainPanel* parent, int id, int x, int y, int radius, String name, String filename =
			String::empty);
	~CircleComponent();

	void mouseEnter(const MouseEvent& e);
	void mouseExit(const MouseEvent& e);
	void mouseDown(const MouseEvent& e);
	void mouseUp(const MouseEvent& e);
	void paint(Graphics& g);
	void incrementAngle();

};

#endif
